import { h, fragment } from '@knno/dom/jsx';
import { Toast } from '../../../dist/components/toast/toast';
import { Button } from '../../../dist/jsx/button';
import { bar } from './index.css';

export function ShowToast() {
	let toastCount = 0;
	return (
		<>
			<h2>Toast</h2>
			<div class={bar}>
				<Button
					type="primary"
					text="弹出一个提示"
					onclick={() => {
						++toastCount;
						console.log('toast:' + toastCount);
						Toast.show('这是一个提示:' + toastCount);
					}}
				/>
			</div>
		</>
	);
}
